#!/bin/bash
#jpackage --input input --main-class dailytools.dailycli.Main --main-jar dailycli-1.0.jar --add-launcher  dailycli=input/dailycli.sh
rm -rf target/jpackage
mkdir -p target/jpackage/input
mkdir -p target/jpackage/output
cp target/dailycli-1.0.jar target/jpackage/input/
cp -r target/libs/* target/jpackage/input/

jpackage --name dailycli-m \
--type deb \
--app-version 1.0 \
--add-launcher dailycli1=script/dailycli-m1.properties \
--module-path target/jpackage/input/ \
--module dailytools.dailycli/dailytools.dailycli.Main \
--dest target/jpackage/output/

jpackage --name dailycli-m \
--type app-image \
--app-version 1.0 \
--add-launcher dailycli1=script/dailycli-m1.properties \
--module-path target/jpackage/input/ \
--module dailytools.dailycli/dailytools.dailycli.Main \
--dest target/jpackage/output/

sudo -S dpkg -i target/jpackage/output/dailycli-m_1.0_amd64.deb <<EOF
renyaoxiang
EOF

